package cn.edu.sgu.www.mhxysy.dto.qiling;

import cn.edu.sgu.www.mhxysy.consts.CustomMessages;
import cn.edu.sgu.www.mhxysy.dto.DataTransferObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Data
@ApiModel
public class QilingTaozhuangDTO implements DataTransferObject {

	@ApiModelProperty(value = "ID")
	private Integer id;

	/**
	 * 套装名称
	 */
	@NotBlank(message = "套装名称" + CustomMessages.NOT_NULL)
	@ApiModelProperty(value = "套装名称", required = true)
	private String name;

	/**
	 * 套装类型
	 */
	@Positive(message = "套装类型" + CustomMessages.ILLEGAL)
	@NotNull(message = "套装类型" + CustomMessages.NOT_NULL)
	@ApiModelProperty(value = "套装类型", required = true)
	private Integer type;

	/**
	 * 套装说明
	 */
	@NotBlank(message = "套装说明" + CustomMessages.NOT_NULL)
	@ApiModelProperty(value = "套装说明", required = true)
	private String note;

	/**
	 * 生效件数
	 */
	@Range(min = 2, max = 6, message = "生效件数" + CustomMessages.ILLEGAL)
	@NotNull(message = "生效件数" + CustomMessages.NOT_NULL)
	@ApiModelProperty(value = "生效件数", required = true)
	private Integer count;

	/**
	 * 说明模板
	 */
	@NotBlank(message = "说明模板" + CustomMessages.NOT_NULL)
	@ApiModelProperty(value = "说明模板", required = true)
	private String template;
}